package com.cn.qtms.controller.codename;//类注释设置模板

import com.cn.qtms.base.controller.BaseJpaController;
import com.cn.qtms.common.codename.CodeNameItem;
import com.cn.qtms.common.result.Result;
import com.cn.qtms.common.result.ResultUtil;
import com.cn.qtms.entity.TmSecGoods;
import com.cn.qtms.service.codename.CodeNameService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.ArrayList;
import java.util.List;

/**
 * @Name:CodeNameController
 * @Description:
 * @Author: zhangyang
 * @Date: 2019-12-26 14:36
 **/
@RestController
@RequestMapping("ds")
public class CodeNameController extends BaseJpaController {
    @Autowired
    private CodeNameService service;

    /**
     * 星期信息
     *
     * @return
     */
    @GetMapping("weeks")
    public Result<List<CodeNameItem>> weeks() {
        return ResultUtil.success(service.weeks());
    }

    /**
     * 场次信息下拉框
     * @return
     */
    @GetMapping("actTypes")
    public Result<List<CodeNameItem>> actTypes() {
        return ResultUtil.success(service.actTypes());
    }

    /**
     * 根据当前时间获取上方的下拉框
     * @return
     */
    @GetMapping("nowActTypes")
    public Result<List<CodeNameItem>> nowActTypes(){
        return ResultUtil.success(service.nowActType());
    }

    /**
     * 会员等级信息
     * @return
     */
    @GetMapping("levels")
    public Result<List<CodeNameItem>> levels(){
        return ResultUtil.success(service.levels());
    }
}
